#ifndef MAVLINK_INTERFACE_HPP_
#define MAVLINK_INTERFACE_HPP_

#include <mavlink/asctec_sdk_mavlink_types/mavlink.h>
#include <lcm/lcm-cpp.hpp>
#include <lcmtypes/asctec_sdk_driver.hpp>

namespace asctec_sdk_driver {

// broadcasting stuff received from the quad
void publish_imu_message(lcm::LCM * lcm, const mavlink_asctec_imu_t * imu,
                         int64_t recv_time);
void publish_gps_message(lcm::LCM * lcm, const mavlink_asctec_gps_t * gps,
                         int64_t recv_time);
void publish_rc_channels_message(lcm::LCM * lcm,
                                 const mavlink_asctec_rc_data_t * rc_channels,
                                 int64_t recv_time);
void publish_heartbeat_message(lcm::LCM * lcm,
                               const mavlink_asctec_heartbeat_t * heartbeat,
                               int64_t recv_time, int64_t host_time);
void publish_motor_rpm_message(lcm::LCM* lcm,
                               const mavlink_asctec_motor_rpm_t * rpms,
                               int64_t recv_time);

// sending stuff to the quad
void send_stick_commands(int fd, const quad_control_msg_t * control_msg);
void send_motor_commands(int fd, const motor_commands_t * motor_command_msg);
void send_api_command(int fd, const mavlink_asctec_api_command_t * api_command);

}  // namespace asctec_sdk_driver

#endif /* MAVLINK_INTERFACE_HPP_ */
